package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface DishFlavorMapper {
    /**
     * 根据菜品id删除对应的口味信息
     * @param ids
     */
    // delete from dish_flavor where dish_id in (1,2,3);
    void deleteFlavorsByDishId(List<Long> ids);

    /**
     * 批量插入口味信息
     * @param flavors
     */
    void insertBatch(List<DishFlavor> flavors);

    /**
     * 根据菜品id查询口味信息
     * @param id
     * @return
     */
    List<DishFlavor> getFlavorsByid(Long id);
}
